<style tyle="text/css">
  .modal-lg {
    width: 70%;
  }
</style>
<div class="modal-header">
  <h4 class="modal-title">点对点授权</h4>
</div>
<div class="modal-body">

    <form name="form" class="form-horizontal ng-pristine ng-valid-required">
      <div class="form-group">
        <label class="col-lg-3 control-label">选择机构:</label>
        <div class="col-lg-5">
          <ui-select ng-model="search.office" theme="bootstrap">
            <ui-select-match placeholder="选择机构...">{{$select.selected.name}} ( {{$select.selected.code}} )</ui-select-match>
            <ui-select-choices repeat="office in office_list | filter: {'name': $select.search}">
              <span>{{office.name}} ( {{office.code}} )</span>
            </ui-select-choices>
          </ui-select>
        </div>
        <label class="col-lg-3">
          <button class="btn btn-success" type="button" ng-click="add()">添加</button>
        </label>
      </div>
    </form>

    <div class="panel panel-default" ng-if="sel_list.length > 0">
        <table class="table table-striped table-bordered table-condensed tree_table">
          <thead>
            <tr>
              <th class="col-md-1 text-center">产品名称</th>
              <th class="col-md-1 text-center">机构名称</th>
              <th class="col-md-1 text-center">机构编号</th>
              <th class="col-md-1 text-center">加价金额(元)</th>
              <th style="width: 3%"></th>
            </tr>
          </thead>
          <tbody>
            <tr ng-repeat="info in sel_list">
              <td class="text-center">{{office.name}}</td>
              <td class="text-center">{{info.company_name}}</td>
              <td class="text-center">{{info.company_code}}</td>
              <td class="text-center">
                <input type="number" class="form-control" style="height:30px" ng-disabled="true" ng-model="info.floating_price">
              </td>
              <td class="text-center">
                <button class="btn btn-rounded btn-sm btn-icon btn-danger" ng-click="remove($index)">
                  <i class="fa fa-times"></i>
                </button>
              </td>
            </tr>
          </tbody>
        </table>
    </div>
    

</div>
<div class="modal-footer">
    <button class="btn btn-success" type="button" ng-click="ok()">确定</button>
    <button class="btn btn-danger" type="button" ng-click="cancel()">取消</button>
</div>
